/* 基础样式 */
.container {
    padding: 20px;
    max-height: calc(100vh - 171px);
    overflow-y: auto;
    background-color: #FCFBF8;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23704214' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.mainContent {
    flex: 1;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* 头部区域 */
.headerSection {
    margin-bottom: 1.5rem;
}

.pageTitle {
    font-size: 1.5rem;
    font-weight: bold;
    color: #8B5A2B;
    margin: 0;
}

.currentDate {
    color: #666;
    margin-top: 0.5rem;
}

/* 表单容器 */
.formContainer {
    max-width: 100%;
    margin: 0 auto;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 区域标题 */
.sectionTitle {
    font-size: 1.1rem;
    font-weight: 500;
    color: #8B5A2B;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.icon {
    color: #4A6741 !important;
    margin-right: 0.5rem;
}

/* 电话搜索区域 */
.phoneSearchContainer {
    position: relative;
}

.phoneInput {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.phoneInput:focus {
    outline: none;
    border-color: #4A6741;
    box-shadow: 0 0 0 2px rgba(74, 103, 65, 0.2);
}

.searchIcon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* 搜索结果 */
.searchResults {
    position: absolute;
    z-index: 10;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.25rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
    max-height: 240px;
    overflow-y: auto;
}

.searchResultItem {
    padding: 0.75rem;
    cursor: pointer;
    transition: background-color 0.1s;
}

.searchResultItem:hover {
    background-color: #f5f5f5;
}

.clientName {
    font-weight: 500;
}

.clientPhone {
    font-size: 0.9rem;
    color: #666;
}

.clientRemark {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.25rem;
}

/* 项目搜索 */
.projectSearchContainer {
    position: relative;
    margin-bottom: 1rem;
}

.projectSearchInput {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.projectSearchInput:focus {
    outline: none;
    border-color: #4A6741;
    box-shadow: 0 0 0 2px rgba(74, 103, 65, 0.2);
}

/* 项目内容区域 */
.projectContent {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.label {
    display: block;
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 0.5rem;
}

.required {
    color: #ef4444;
}

/* 项目列表 */
.projectList {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .projectList {
        grid-template-columns: repeat(2, 1fr);
    }
}

.checkboxItem {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #eee;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.1s, border-color 0.1s;
}

.checkboxItem:hover {
    background-color: #f9f9f9;
}

.checkboxItem.selected {
    border-color: #4A6741;
    background-color: rgba(74, 103, 65, 0.05);
}

.checkbox {
    color: #4A6741;
    accent-color: #4A6741;
    width: 18px;
    height: 18px;
}

.projectName {
    margin-left: 0.5rem;
    flex: 1;
}

.selectedSpec {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    color: #4A6741;
    font-weight: 500;
}

/* 已选项目区域 */
.selectedProjectsSection {
    margin-top: 1rem;
}

.tagsContainer {
    border: 2px dashed #ddd;
    border-radius: 0.5rem;
    padding: 1rem;
    min-height: 60px;
}

.tagsList {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.selectedTag {
    background-color: rgba(74, 103, 65, 0.1);
    color: #4A6741;
    border-radius: 999px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
}

.tagClose {
    cursor: pointer;
    transition: color 0.1s;
    font-size: 1.2em;
}

.tagClose:hover {
    color: #ef4444;
}

.emptyTagsHint {
    color: #999;
    font-size: 0.875rem;
    text-align: center;
}

/* 表单组 */
.formGroup {
    margin-top: 1rem;
}

.input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus {
    outline: none;
    border-color: #4A6741;
    box-shadow: 0 0 0 2px rgba(74, 103, 65, 0.2);
}

.textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    font-size: 1rem;
    resize: none;
    min-height: 80px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.textarea:focus {
    outline: none;
    border-color: #4A6741;
    box-shadow: 0 0 0 2px rgba(74, 103, 65, 0.2);
}

/* 按钮组 */
.buttonGroup {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btnPrimary {
    background-color: #4A6741;
    color: white;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
}

.btnPrimary:hover {
    background-color: rgba(74, 103, 65, 0.9);
}

.btnSecondary {
    background-color: white;
    color: #333;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
}

.btnSecondary:hover {
    background-color: #f5f5f5;
}

/* 无结果提示 */
.noResults {
    text-align: center;
    padding: 1.5rem;
    color: #777;
    font-style: italic;
}

/* 弹窗样式 */
.modalBackdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modalBackdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modalContent {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    width: 90%;
    max-width: 500px;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modalBackdrop.active .modalContent {
    transform: translateY(0);
}

.modalHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modalTitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: #8B5A2B;
    margin: 0;
}

.closeModalBtn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.25rem;
    transition: color 0.2s;
}

.closeModalBtn:hover {
    color: #333;
}

/* 规格选项 */
.specOptions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.specOption {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #eee;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.1s, border-color 0.1s;
}

.specOption:hover {
    background-color: #f9f9f9;
}

.radio {
    color: #4A6741;
    accent-color: #4A6741;
    width: 18px;
    height: 18px;
}

.specText {
    margin-left: 0.5rem;
    flex: 1;
}

.specPrice {
    margin-left: auto;
    color: #666;
}

/* 弹窗底部按钮 */
.modalFooter {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

:global(.ant-picker-outlined) {
    width: 100% !important;
}

